package com.morpheus.redis.redisson.api.lock;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;

public interface SingleLock {
	public boolean hasLock();

	public void lock();

	public void lock(long time, TimeUnit unit) throws InterruptedException;

	public void lockInterruptibly(String lockName) throws InterruptedException;

	public Condition newCondition();

	public boolean tryLock();

	public boolean tryLock(long time, TimeUnit unit) throws InterruptedException;

	public void unlock();

	public void destory();
}
